<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="ssm" uri="http://ssm.elangzhi.com/jsp/tag/functions" %>
<%--
Created by GaoXiang
Date: 2019-08-07 14:27:12 星期三
Version: 1.0
过车记录编辑页面
--%>

<div class="portlet light" >
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form action="#" class="form-horizontal" id="edit-module">
            <div class="form-body">

                <div class="row">
                    <div class="col-md-6 hide">
                        <div class="form-group">
                            <label class="control-label col-md-3">ID</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" name="id" value="${data.id}" placeholder="默认生成，ID">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">parkCode</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="parkCode" value="${data.parkCode}" placeholder="parkCode">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">parkId</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="parkId" value="${data.parkId}" placeholder="parkId">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">parkName</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="parkName" value="${data.parkName}" placeholder="parkName">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">uniqueNo</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="uniqueNo" value="${data.uniqueNo}" placeholder="uniqueNo">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">direction</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="direction" value="${data.direction}" placeholder="direction">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">plateNo</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="plateNo" value="${data.plateNo}" placeholder="plateNo">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">cardNo</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="cardNo" value="${data.cardNo}" placeholder="cardNo">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">passTime</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="passTime" value="${data.passTime}" placeholder="passTime">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">vehType</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="vehType" value="${data.vehType}" placeholder="vehType">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">vehColor</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="vehColor" value="${data.vehColor}" placeholder="vehColor">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">operatorName</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="operatorName" value="${data.operatorName}" placeholder="operatorName">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">laneCode</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="laneCode" value="${data.laneCode}" placeholder="laneCode">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">terminalNo</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="terminalNo" value="${data.terminalNo}" placeholder="terminalNo">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">gateName</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="gateName" value="${data.gateName}" placeholder="gateName">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">laneName</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="laneName" value="${data.laneName}" placeholder="laneName">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">inPassTime</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="inPassTime" value="${data.inPassTime}" placeholder="inPassTime">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">inUniqueNo</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="inUniqueNo" value="${data.inUniqueNo}" placeholder="inUniqueNo">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">shouldPay</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="shouldPay" value="${data.shouldPay}" placeholder="shouldPay">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">actualPay</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="actualPay" value="${data.actualPay}" placeholder="actualPay">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">picFilePath</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="picFilePath" value="${data.picFilePath}" placeholder="picFilePath">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label col-md-3">passPicPath</label>
                            <div class="col-md-9">
                                <input type="text" class="form-control" required name="passPicPath" value="${data.passPicPath}" placeholder="passPicPath">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-actions">
                <div class="row">
                    <div class="col-md-6">
                        <div class="row">
                            <div class="col-md-offset-3 col-md-9">
                                <button type="button" class="btn green" onclick="edit();">修改过车记录</button>
                                <button type="button" class="btn default" onclick="layer.close(layer_editModule);">取消</button>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6"> </div>
                </div>
            </div>
        </form>
        <!-- END FORM-->
    </div>
</div>
<!-- script 开始 -->
<script>

    $(function(){
        //初始化页面
        initPage();
    });

    /**
     * 保存编辑的过车记录
     */
    function edit(){
        var param = tools.formParams("edit-module");
        if(tools.valid("edit-module")){
            tools.post("/passData/update",param,function(data){
                if(data.success){
                    layer.msg('过车记录修改成功', {icon: 1,time:1000},function(){
                        //刷新列表页面
                        toPage(null);
                        //关闭弹窗
                        layer.close(layer_editModule);
                    });
                }else{
                    tools.errorTip(data.code,data.data);
                }
            });
        }
    }
</script>
<!-- script 结束 -->